package com.example.concurrent;

import lombok.extern.slf4j.Slf4j;

@Slf4j(topic = "c.test11")
public class Test11 {
	public static void main(String[] args) {
		Thread t1 = new Thread(()->{
			log.debug("sleep...");
			try {
				Thread.sleep(5000);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		} , "t1");
		t1.start();
		log.debug("interrupt...");
		try {
			Thread.sleep(1000);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		t1.interrupt();
		log.debug("打断标记：{}", t1.isInterrupted());
	}
}
